package com.wu.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wu.pojo.Users;

import java.util.Map;

/**
 * @author: 吴磊
 * @program: blog
 * @create: 2021-04-19 20:10
 */
public interface UsersService extends IService<Users> {
    Map<String, Object> login(String telPhone, String password) throws Exception;

    void register(String password, String telPhone);

    void telPhoneIsOk(String telPhone);

    void updateUserInfo(
            String userName,
            String userPassword,
            String userEmail,
            String userProfilePhoto,
            String userTelephoneNumber,
            String userNickname,
            String userSex,
            String userIntroduce) throws Exception;

    String getUserPassword() throws Exception;

    Map<String, Object> getUserInfo(String userId);


    /**
     * 根据Id查询关注的博主
     *
     * @return
     */
    Map<String, Object> getFriendsByFriendIdList(String userId, Integer p);

    /**
     * 通过用户id获取用主页面的基本信息
     *
     * @param userId
     * @return
     */
    Map<String, Object> getUserMainInfo(String userId);


    /**
     * 通过用户Id查询粉丝的基本信息
     *
     * @param userId
     * @param curPage
     * @return
     */
    Map<String, Object> getUserFansByUserId(String userId, Integer curPage);


    /**
     * 判断是否是自己的主页面
     *
     * @param userId
     * @return
     */
    Map<String, Object> isOwnerMainUI(String userId);


    /**
     * 获取用户文章下待审核的评论数量（每次刷新都要获取）
     *
     * @return
     */
    Map<String, Object> getUserArticleCommentsWithNotPass();
}
